<!--
 *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree.
-->
<!DOCTYPE html>
<html>
<head>
  <meta name="keywords" content="WebRTC, HTML5, JavaScript" />
  <meta name="description" content="Client-side WebRTC code samples." />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
  <base target="_blank">
  <title>WebRTC Troubleshooter</title>

  <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700">
  <link rel="stylesheet" href="css/main.css" />
  <link rel="stylesheet" href="css/main_nolint.css" />

  <script src="bower_components/webcomponentsjs/webcomponents.js"></script>
  <link rel="import" href="bower_components/core-toolbar/core-toolbar.html">
  <link rel="import" href="bower_components/core-icon/core-icon.html">
  <link rel="import" href="bower_components/core-icons/av-icons.html">
  <link rel="import" href="bower_components/core-collapse/core-collapse.html">
  <link rel="import" href="bower_components/paper-dialog/paper-dialog.html">
  <link rel="import" href="bower_components/paper-dialog/paper-action-dialog.html">
  <link rel="import" href="bower_components/paper-dialog/paper-dialog-transition.html">
  <link rel="import" href="bower_components/paper-progress/paper-progress.html">
  <link rel="import" href="bower_components/paper-button/paper-button.html">
  <link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
  <link rel="import" href="bower_components/testrtc/ui/line-chart.html">
  <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-48530561-3', 'auto');
    ga('send', 'pageview');
  </script>
</head>
<body unresolved>
  <!-- Title toolbar -->
  <core-toolbar class="title">
    <span flex>WebRTC Troubleshooter</span>
    <paper-icon-button icon="menu" onclick="settingsDialog.toggle()"></paper-icon-button>
    <paper-icon-button icon="bug-report" onclick="report.open()"></paper-icon-button>
    <paper-button id="start-button" onclick="start()" raised disabled>Start</paper-button>
  </core-toolbar>

  <!-- Placeholder for dynamically generated test suites. -->
  <div id="content"></div>

  <!-- GetUserMedia pending dialog -->
  <paper-dialog id="gum-pending-dialog"
                heading="Welcome to WebRTC Troubleshooter"
                backdrop autoCloseDisabled>
    <p>To test your webcam, microphone, and speakers we need permission to
        them selecting by “Allow”.</p>
  </paper-dialog>

  <!-- GetUserMedia error dialog -->
  <paper-dialog id="gum-error-dialog"
                heading="Welcome to WebRTC Troubleshooter"
                backdrop autoCloseDisabled>
    <p>Click the <core-icon icon="av:videocam-off"></core-icon>
      icon in the URL bar above to give TestRTC access to your computer's
      camera and microphone.</p>
    <p>GetUserMedia reason: <span id="gum-error-message"></span></p>
    <paper-icon-button icon="bug-report" onclick="report.open()">File a bug</paper-icon-button>
  </paper-dialog>

  <!-- GetUserMedia not supported dialog -->
  <paper-dialog id="gum-not-supported-dialog"
                heading="Welcome to WebRTC Troubleshooter"
                backdrop autoCloseDisabled>
    <p>GetUserMedia is not supported in your browser, please use a WebRTC
      enabled browser listed at <a href="http://www.webrtc.org">http://www.webrtc.org</a>.</p>
  </paper-dialog>

  <!-- Settings dialog -->
  <paper-dialog id="settings-dialog" heading="Settings" transition="paper-dialog-transition-center">
    <div class="select"><label>Audio source: <select id="audioSource"></select></label></div>
    <div class="select"><label>Video source: <select id="videoSource"></select></label></div>
  </paper-dialog>

  <!-- Report dialog -->
  <paper-dialog id="report-dialog" heading="Bug Report" backdrop autoCloseDisabled transition="paper-dialog-transition-center">
    <p>Please file a bug in the <a id="report-link">Chromium bug tracker</a> and attach the report from this page.</p>
    <paper-button id="report-download" onclick="report.downloadReport()">Download Report</paper-button>
    <paper-button onclick="this.parentElement.close()">Close</paper-button>
  </paper-dialog>

  <!-- Add common files after this line. -->
  <script src="js/adapter.js"></script>
  <script src="js/report.js"></script>
  <script src="js/main.js"></script>
  <script src="js/call.js"></script>
  <script src="js/stats.js"></script>
  <script src="js/ssim.js"></script>
  <script src="js/gumhandler.js"></script>
  <script src="js/util.js"></script>

  <!-- Add tests after this line. -->
  <script src="js/mictest.js"></script>
  <script src="js/camresolutionstest.js"></script>
  <script src="js/conntest.js"></script>
  <script src="js/bandwidth_test.js"></script>
</body>
</html>
